package ln.javatest.day09.demo05;

public class hero {
    private String name;
    private Skill skill;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Skill getSkill() {
        return skill;
    }

    public void setSkill(Skill skill) {
        this.skill = skill;
    }

    public hero(String name, Skill skill) {
        this.name = name;
        this.skill = skill;
    }

    public hero() {
    }

    public  void attack(){
        System.out.print("我叫"+ name + "我的技能是" );
        skill.use();
    }
}
